Kml Builder help  
Docking Panel Concept

Introduction

The windows in the program can be left to float above the main window or can be docked to the top, bottom, left or right margins. This versatility give you the power to build screens that are easy to use and tailored to your preferences. Because of this versatility and wide range of options, managing the windows may be a little daunting at first; however with a little practice this flexibility can be employed to build the screen or screens that best suit your mode of working.

DockPanel Acknowledgment

This superb module was written by Weifen Luo and made available at no charge to the development community via the Internet.

Basic Docking

Basic docking involves locking a window against one of the four sides of the main window and in the document area.

Eight windows; one docked on the left, one on the right, four on the top of the document area and one on the bottom of the document area.

Panes

A pane is an area of the screen, just like a window. The difference is that a pane can accommodate several windows by 'stacking' them on top of each other with only a tab showing to see what lies underneath. You can click on the tab to bring a different window to the top.

Many panes we will see have only one window within them. They do, however, retain to ability to take more.

Between docked panes you can resize a pane when you see  or .

Picking up a window

Windows are docked by dragging them to different parts of the screen. To start we want to convert any docked window into a floating window. A floating window is simply one that isn't docked to any side.

There are several ways to get a floating window:

Once a window is floating it can be dragged to be docked anywhere or double-clicked to be docked to its previous dock area.

The preview window has been made to float by dragging its tab. A double-click on a docked window tab would also achieve the same effect.

Docking Suggestions

When a window is dragged to be docked, often there is more than one option available, so the program will show the result with a grey outline. These are called Docking Suggestions. The result will only occur if you release the mouse button at that point. By moving the mouse a little, often an alternate suggestion will appear.

Docking to a side

If a side does not yet have a pane docked to it, we can dock a pane there. If there is already a pane docked, then see the next section on sharing space.

Drag a floating window to the edge of the main form. The outline of the window will move with the mouse and change to a docking suggestion when positioned correctly. When docked the window will be within a pane.

The position of the mouse cursor is the crucial factor in successful docking – not the position of the window outline. Drag the window and position the mouse cursor just a few pixels in from the edge of the main window. In many cases, by moving backwards and forwards over the edge two docking suggestions will be made.

Tip: On a blank main window with a grey background it is often impossible to see the docking suggestions. It is sometimes useful to start a unwanted window and fill the main screen with it before docking the required windows. When the layout is as required, close the unwanted window.

Closing a Window

Every window with an 'X' in its top right corner can be closed but will leave other windows in its pane untouched.
If the window is the last or only one in its pane, the pane will disappear too.

Sharing Space

There are two ways to share an already-occupied space. These are called pane-splitting and pane-sharing. Unlike real life, our windows can fit inside a pane.

Pane-splitting

By dragging the floating window and positioning your mouse cursor near the edge of the pane to be split, you can get the two windows to split the space in half and see both, but with only half the space each.

This can be done vertically or horizontally by moving the cursor near to the left, right, top or bottom boundary of the window to be split.

Pane Sharing

As an alternative to pane-splitting, you can get your windows to share a space – they will share a single pane. You choose the window to be seen from the tabs displayed at the edge of the pane. Drag the floating form so the mouse cursor is over the top of the window.

There are two slight variations on this, depending on the original window occupying the space. The window can be:

Target is docked on the side

"How do I know?" – a side-docked pane has the push-pin icon on the right-hand end of the title bar to allow it to be slid out of the way.

In this case the docking suggestion merely outlines the existing form that currently occupies the pane.

It is fairly easy to get a pane-splitting suggestion when attempting this. Move the mouse down a little from the top to get pane-sharing.



Copyright © 2009-2011 NorthGates Systems. All rights reserved.